export const formmateDate = (date: Date) => {
  if (!date) return;
  const year = date.getFullYear();
  const month = date.getMonth() + 1;
  const date1 = date.getDate();

  return `${year}-${month.toString().padStart(2, "0")}-${date1
    .toString()
    .padStart(2, "0")}`;
};

export const formmateTime = (date: Date) => {
  if (!date) return;
  const hours = date.getHours();
  const minute = date.getMinutes();

  return `${hours.toString().padStart(2, "0")}:${minute
    .toString()
    .padStart(2, "0")}`;
};
